<%@ page import="org.jeecgframework.web.util.StaticValue" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:1px;">
  <t:datagrid name="cbsWarehouseList" onDblClick="dbClick"  onClick="onDbClick"   fitColumns="false" title="物流仓库信息表" actionUrl="cbsWarehouseController.do?datagridOfzyChooseWa" idField="id" fit="true" queryMode="group">
   <t:dgCol title="主键"  field="id"  hidden="true" treefield="id" queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="仓库"  field="name" treefield="text"   queryMode="single" query="true"  width="200"></t:dgCol>
  </t:datagrid>
  </div>
 </div>
 <script src = "webpage/com/zybk/com.wuliu/cbsWarehouseList.js"></script>
<script type="text/javascript" src="plug-in/jquery/jquerysession.js"></script>
 <script type="text/javascript">
 $(document).ready(function(){
 		//给时间控件加上样式
 			$("#cbsWarehouseListtb").find("input[name='createDate']").attr("class","Wdate").attr("style","height:20px;width:90px;").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
 			$("#cbsWarehouseListtb").find("input[name='updateDate']").attr("class","Wdate").attr("style","height:20px;width:90px;").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
 });
 function onDbClick() {
     var datas = $("#cbsWarehouseList").datagrid("getSelections");
     var va =  datas[0].name;
     $.session.set("name",va);
 }
 function dbClick(index,data){
     window.parent.$('.ui_state_highlight')[0].click();
 }
//导入
function ImportXls() {
	openuploadwin('Excel导入', 'cbsWarehouseController.do?upload', "cbsWarehouseList");
}

//导出
function ExportXls() {
	JeecgExcelExport("cbsWarehouseController.do?exportXls","cbsWarehouseList");
}

//模板下载
function ExportXlsByT() {
	JeecgExcelExport("cbsWarehouseController.do?exportXlsByT","cbsWarehouseList");
	
}
 function addCreateTab() {
     addOneTab('添加', 'cbsWarehouseController.do?goAdd', '');
 }
 function setPriority() {
     var datas = $("#cbsWarehouseList").datagrid("getSelections");
     if(datas.length != 1){
         tip("请选择一条信息");
         return;
     }
     var setid = datas[0].id;
     $.ajax({
         type:"post",
         dataType:"json",
         url:"cbsWarehouseController.do?setPriority&sid="+setid,
         success:function (data) {
             var map = data.attributes;
             tip(map.code);
             reloadTable();
         }
     })
 }
 function update() {
     var datas = $("#cbsWarehouseList").datagrid("getSelections");
     if(datas.length != 1){
         tip("请选择一条信息");
         return;
     }
     var id = datas[0].id;
     addOneTab("修改","cbsWarehouseController.do?goUpdate&id="+id,"");
 }
 function look() {
     var datas = $("#cbsWarehouseList").datagrid("getSelections");
     if(datas.length != 1){
         tip("请选择一条信息");
         return;
     }
     var id = datas[0].id;
     addOneTab("查看","cbsWarehouseController.do?goLook&id="+id,"");
 }
 </script>